package log

import (
	"time"
	"zinx_websokect_poker/zinx/zlog"
)

func init(){
	//设置log标记位，加上长文件名称 和 微秒 标记
	zlog.ResetFlags(zlog.BitDate | zlog.BitLongFile | zlog.BitLevel)
	//添加标记位
	zlog.AddFlag(zlog.BitShortFile | zlog.BitTime)
	//设置日志写入文件
	file := time.Now().Format("2006-01-02") + ".log"
	zlog.SetLogFile("./log_file", file)
}

func Info(model, info string){
	zlog.SetPrefix(model)
	zlog.Info(info)
}

func Debug(model,info string){
	zlog.SetPrefix(model)
	zlog.Debug(info)
}

func Error(model,info string){
	zlog.SetPrefix(model)
	zlog.Error(info)
}